home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 16506 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: newshub.cts.com!ns
  2. From: tsk@cts.com (John Lutz)
  3. Newsgroups: comp.os.ms-windows.programmer.tools.mfc,comp.lang.c++
  4. Subject: Re: Linked Lists
  5. Date: 11 Apr 1996 02:42:31 GMT
  6. Organization: Cathedral Software, Inc.
  7. Message-ID: <4khrin$m41@news2.cts.com>
  8. References: <4k2kom$k5r@news2.cts.com> <31667AC8.4EE2@mindlink.bc.ca>
  9. NNTP-Posting-Host: tsk.cts.com
  10. X-Newsreader: News Xpress Version 1.0 Beta #4
  11.  
  12. In article <31667AC8.4EE2@mindlink.bc.ca>,
  13.    Blake Kadatz <blake_kadatz@mindlink.bc.ca> wrote:
  14. >John Lutz wrote:
  15. >> 
  16. >>   I would like to store all the objects in a linked list for a given 
  17. window. I
  18. >> would like for the linked list to handle the dynamic allocation of these
  19. >> object and return the pointer to the subclass that is allocating the 
  20. objects
  21. >> on the linked list. I would like for the linked list class to delete all
  22. >> objects dynamically.
  23. >
  24. >Have you tried CObList or CPtrList?  These classes don't automatically 
  25. >delete the object for you, but when you remove the object from the list, 
  26. >it returns you a pointer.  Easy -- just delete that pointer.
  27. >
  28.  
  29.  
  30. Opps, I forgot to mention it's under Visual C++ 4.0 but not using
  31. MFC.
  32.  
  33. John
  34.  
  35. PS- Also, this project doesn't include MFC, how difficult would it be to 
  36. implemente MFC (linking in a .LIB file)? I'm somewhat new to MFC/VC++ but not 
  37. to C++.
  38.  
  39.